package com.yunze.task.yunze.sys;

import com.yunze.common.mapper.mysql.YzCardMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Component
public class CardUpdTaskMQ {

    @Resource
    private YzCardMapper yzCardMapper;
    /**
     * 修改 测试期 已有激活时间状态 为 已激活
     * */
    @RabbitHandler
    @RabbitListener(queues = "admin_updStatusShowId_queue")
    public void updStatusShowId(String msg) {
        try {
            Map<String, Object> map = new HashMap<>();
            int updCount = yzCardMapper.updStatusShowId(map);
            System.out.println("yzCardMapper.updStatusId = "+updCount);
        } catch (Exception e) {
            System.out.println(" 修改 测试期 已有激活时间状态 为 已激活 失败 " + e.getMessage().toString());
        }
    }
}
